﻿/*
 * KLF Headless Browser
 * Written by Kris Oye <kristianoye@gmail.com>
 * Copyright (C) 2011-2012.  All rights reserved.
 */
namespace KLF.Lib.Browser.DOM.HTML
{
    #region Using Statements

    using System;

    #endregion

    /// <summary>
    /// Base font. See the BASEFONT element definition in HTML 4.01. 
    /// This element is deprecated in HTML 4.01.
    /// </summary>
    public class HTMLBaseFontElement : HTMLElement
    {

        #region Constructors

        internal HTMLBaseFontElement(Document owner)
            : base(owner, HTMLConstants.HTML_TAG_BASEFONT)
        {
        }

        #endregion

        #region DOM Level 2 HTML Compliance

        /// <summary>
        /// Font color. See the color attribute definition in HTML 4.01.
        /// This attribute is deprecated in HTML 4.01.
        /// </summary>
        [Obsolete]
        public string color
        {
            get
            {
                return getAttribute(HTMLConstants.HTML_ATT_COLOR);
            }
            set
            {
                if (String.IsNullOrEmpty(value))
                    removeAttribute(HTMLConstants.HTML_ATT_COLOR);
                else
                    setAttribute(HTMLConstants.HTML_ATT_COLOR, value);
            }
        }

        /// <summary>
        /// Font face identifier. See the face attribute definition in 
        /// HTML 4.01. This attribute is deprecated in HTML 4.01.
        /// </summary>
        [Obsolete]
        public string face
        {
            get
            {
                return getAttribute(HTMLConstants.HTML_ATT_FACE);
            }
            set
            {
                if (String.IsNullOrEmpty(value))
                    removeAttribute(HTMLConstants.HTML_ATT_FACE);
                else
                    setAttribute(HTMLConstants.HTML_ATT_FACE, value);
            }
        }

        /// <summary>
        /// Computed font size. See the size attribute definition in HTML 4.01.
        /// This attribute is deprecated in HTML 4.01.
        /// </summary>
        [Obsolete]
        public int size
        {
            get
            {
                return getAttributeAsType<int>(HTMLConstants.HTML_ATT_SIZE, 0);
            }
            set
            {
                setAttributeAsType<int>(HTMLConstants.HTML_ATT_SIZE, value);
            }
        }

        #endregion
    }
}
